Skip to content

3. Hackbot admin panel#445

Open
ReehalS wants to merge 9 commits intomainfrom
hackbot-admin-panel
Open

3. Hackbot admin panel#445
ReehalS wants to merge 9 commits intomainfrom
hackbot-admin-panel

Conversation

@ReehalS
Copy link
Copy Markdown
Member

@ReehalS ReehalS commented Mar 12, 2026

Add HackBot admin panel for knowledge CRUD, import, and usage metrics

  • Knowledge table with create/edit/delete, JSON import with preview,
  • reseed button, and usage metrics dashboard. Context provider with
  • optimistic updates. Admin page updated with hackbot nav link.

MERGE ONLY AFTER #441 IS MERGED

Closes #442

ReehalS added 2 commits March 12, 2026 15:34
…CI/CD

- OpenAI streaming chat endpoint with get_events and provide_links tools
- Server actions for knowledge CRUD, reseed, import, usage metrics
- Event filtering/formatting utilities with timezone-aware LA time handling
- System prompt builder with profile-aware personalization and prefix caching
- Vector search context retrieval with retry/backoff
- Knowledge base JSON (55 entries: FAQ, tracks, judging, submission, general)
- CI/CD seed scripts for hackbot_knowledge to hackbot_docs
- Auth session extended with position, is_beginner, name fields
- Tailwind hackbot-slide-in animation keyframe
- Dependencies: ai@6, @ai-sdk/openai
Knowledge table with create/edit/delete, JSON import with preview,
reseed button, and usage metrics dashboard. Context provider with
optimistic updates. Admin page updated with hackbot nav link.
@ReehalS ReehalS changed the title Hackbot admin panel 3. Hackbot admin panel Mar 12, 2026
@michelleyeoh michelleyeoh marked this pull request as ready for review April 8, 2026 18:50
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an admin-facing HackBot management page under /admin/hackbot to manage knowledge documents (CRUD + import), run maintenance actions (reseed/clear), and view usage metrics. This builds on the HackBot server-side actions introduced in #441.

Changes:

  • Add /admin/hackbot page with a context provider, table + modal CRUD UI, JSON import preview/confirm flow, and result banners.
  • Add usage metrics dashboard widget with period switching (24h/7d/30d).
  • Update admin landing page nav and change HackBot streaming default OpenAI model.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
app/(pages)/admin/page.tsx Adds nav link to the new HackBot admin page
app/(pages)/admin/hackbot/page.tsx New HackBot Knowledge admin page composition
app/(pages)/admin/_hooks/useHackbotKnowledge.tsx Hook to consume HackbotKnowledge context
app/(pages)/admin/_contexts/HackbotKnowledgeContext.tsx Core state/actions for knowledge CRUD, import, reseed, clear
app/(pages)/admin/_constants/hackbotKnowledge.ts Knowledge doc type constants, labels, colors, empty form
app/(pages)/admin/_components/Hackbot/KnowledgeToolbar.tsx Toolbar actions (import/clear/reseed/add) + JSON parsing
app/(pages)/admin/_components/Hackbot/KnowledgeTable.tsx Table view for docs with edit/delete actions
app/(pages)/admin/_components/Hackbot/KnowledgeLoadState.tsx Loading/error gate for knowledge data
app/(pages)/admin/_components/Hackbot/KnowledgeImportPreview.tsx Import preview + confirm/cancel UI
app/(pages)/admin/_components/Hackbot/KnowledgeDocModal.tsx Create/edit modal form for a knowledge doc
app/(pages)/admin/_components/Hackbot/KnowledgeBanners.tsx Success/error banners for operations
app/(pages)/admin/_components/Hackbot/HackbotUsageMetrics.tsx Usage metrics dashboard UI
app/(api)/_utils/hackbot/stream/model.ts Updates default model string for streaming

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HackBot Admin Panel

3 participants